package cn.iocoder.yudao.module.crm.controller.admin.tasktype.vo.tasktypeassignee;

import cn.iocoder.yudao.module.crm.controller.admin.tasktype.vo.tasktypeapprover.TaskTypeApproverDetail;
import cn.iocoder.yudao.module.crm.dal.dataobject.tasktype.TaskTypeApproverDO;
import cn.iocoder.yudao.module.crm.dal.dataobject.tasktype.TaskTypeAssigneeDO;
import com.alibaba.excel.annotation.ExcelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.time.LocalDateTime;

// 表示任务单类型处理人联系详情
@Data
public class TaskTypeAssigneeDetail {
    @Schema(description = "id", example = "15833")
    private Long id;

    @Schema(description = "用户ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "28881")
    private Long userId;

    @Schema(description = "每月下发时间")
    private LocalDateTime monthlyIssueTime;

    public static TaskTypeAssigneeDetail toDetail(TaskTypeAssigneeDO doObj) {
        if (doObj == null) {
            return null;
        }

        TaskTypeAssigneeDetail detail = new TaskTypeAssigneeDetail();
        detail.setId(doObj.getId());
        detail.setMonthlyIssueTime(doObj.getMonthlyIssueTime());
        detail.setUserId(doObj.getUserId());

        return detail;
    }
}
